package org.longs.bean;

import lombok.Data;

@Data
public class PalRGB {
    int R;
    int G;
    int B;

    public PalRGB(short R565) {
        int r = (R565 >> 11) & 0x1F;
        int g = (R565 >> 5) & 0x3F;
        int b = R565 & 0x1F;
        this.R = (r << 3) | (r >> 2);
        this.G = (g << 2) | (g >> 4);
        this.B = (b << 3) | (b >> 2);
    }
}
